package cscie160.project;

import java.rmi.Naming;

/**
 * Created with IntelliJ IDEA.
 * User: Jim
 * Date: 12/14/12
 * Time: 3:57 PM
 * To change this template use File | Settings | File Templates.
 */
public class BankServer {

    public static void main(String argv[])
    {
        // Create and install a security manager
        //	System.setSecurityManager(new RMISecurityManager());
        try
        {
            BankImplementation myBank = new BankImplementation();
            Naming.rebind("//localhost/bank", myBank);
            System.out.println("myBank bound in registry");
            SecurityImplementation mySecurity = new SecurityImplementation();
            Naming.rebind("//localhost/security", mySecurity);
            System.out.println("mySecurity bound in registry " + mySecurity);
        }
        catch (Exception ex)
        {
            ex.printStackTrace();
        }
    }
}
